using System;
using System.Windows;

namespace ns0
{
	internal static class Class0
	{
		internal static void smethod_0(DependencyObject dependencyObject_0, RoutedEventArgs routedEventArgs_0)
		{
			if (dependencyObject_0 is UIElement)
			{
				(dependencyObject_0 as UIElement).RaiseEvent(routedEventArgs_0);
			}
			else if (dependencyObject_0 is ContentElement)
			{
				(dependencyObject_0 as ContentElement).RaiseEvent(routedEventArgs_0);
			}
		}

		internal static void smethod_1(DependencyObject dependencyObject_0, RoutedEvent routedEvent_0, Delegate delegate_0)
		{
			UIElement uIElement = dependencyObject_0 as UIElement;
			if (uIElement != null)
			{
				uIElement.AddHandler(routedEvent_0, delegate_0);
			}
			else
			{
				(dependencyObject_0 as ContentElement)?.AddHandler(routedEvent_0, delegate_0);
			}
		}

		internal static void smethod_2(DependencyObject dependencyObject_0, RoutedEvent routedEvent_0, Delegate delegate_0)
		{
			UIElement uIElement = dependencyObject_0 as UIElement;
			if (uIElement != null)
			{
				uIElement.RemoveHandler(routedEvent_0, delegate_0);
			}
			else
			{
				(dependencyObject_0 as ContentElement)?.RemoveHandler(routedEvent_0, delegate_0);
			}
		}
	}
}
